{% if errors %}
  <div class="alert alert-danger" role="alert">
    <div>
      {% if errors|length > 1 %}
        <ul>
          {% for error in errors %}
            <li>{{ error }}</li>
          {% endfor %}
        </ul>
      {% else %}
        {{ errors.0 }}
      {% endif %}
    </div>
  </div>
{% endif %}
{% for field, errors in fields %}
  {{ field.as_field_group }}
{% endfor %}
{% for field in hidden_fields %}
  {{ field }}
{% endfor %}
